package com.lsp.server.product.mapper;

import com.lsp.server.product.domain.po.ProductShop;
import com.lsp.server.product.domain.po.ProductShopImg;
import com.lsp.server.product.domain.po.ProductSp;
import com.lsp.server.product.domain.vo.ShopVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ShopMapper
 * @Description 商品管理持久层
 * @Author Mr Hao
 * @Date 2021/11/25 14:38
 */
@Mapper
public interface ShopMapper {

    Integer addShop(ProductShop shop);

    void addValues(List<ProductSp> list);

    Long queryCount(Map map);

    List<ShopVo> queryList(Map map);

    void addImgs(List<ProductShopImg> imgs1);

    List<ProductShopImg> imgList(Integer id);

    @Select("select valuess  from product_sp where pid = #{pid}")
    List<String> queryValuesByPid(Integer pid);

    @Delete("delete from product_sp where pid=#{pid}")
    public void delValuesByPid(Integer pid);
}
